


MERGE(1)                 USER COMMANDS                   MERGE(1)



NAME
     merge - three-way file merge

SYNOPSIS
     merge [ -L _l_a_b_e_l_1 [ -L _l_a_b_e_l_3 ] ] [ -p ] [ -q ] _f_i_l_e_1  _f_i_l_e_2
     _f_i_l_e_3

DESCRIPTION
     merge incorporates all changes that lead from _f_i_l_e_2 to _f_i_l_e_3
     into  _f_i_l_e_1.   The  result  goes to standard output if -p is
     present, into _f_i_l_e_1 otherwise.  merge is useful for  combin-
     ing  separate  changes to an original.  Suppose _f_i_l_e_2 is the
     original, and both _f_i_l_e_1  and  _f_i_l_e_3  are  modifications  of
     _f_i_l_e_2.  Then merge combines both changes.

     An overlap occurs if both _f_i_l_e_1 and _f_i_l_e_3 have changes in  a
     common  segment  of lines.  On a few older hosts where diff3
     does not support the -E option, merge does not detect  over-
     laps,  and  merely supplies the changed lines from _f_i_l_e_3. On
     most hosts, if  overlaps  occur,  merge  outputs  a  message
     (unless  the -q option is given), and includes both alterna-
     tives in the result.  The alternatives are delimited as fol-
     lows:

          <<<<<<< _f_i_l_e_1
          _l_i_n_e_s _i_n _f_i_l_e_1
          =======
          _l_i_n_e_s _i_n _f_i_l_e_3
          >>>>>>> _f_i_l_e_3

     If there are overlaps, the user should edit the  result  and
     delete  one  of  the  alternatives.   If  the  -L _l_a_b_e_l_1 and
     -L _l_a_b_e_l_3 options are given, the labels are output in  place
     of the names _f_i_l_e_1 and _f_i_l_e_3 in overlap reports.

DIAGNOSTICS
     Exit status is 0 for no overlaps, 1 for some overlaps, 2 for
     trouble.

IDENTIFICATION
     Author: Walter F. Tichy.
     Revision Number: 5.3; Release Date: 1991/02/28.
     Copyright 8c9 1982, 1988, 1989 by Walter F. Tichy.
     Copyright 8c9 1990, 1991 by Paul Eggert.

SEE ALSO
     diff3(1), diff(1), rcsmerge(1), co(1).








GNU                  Last change: 1991/02/28                    1



